package com.soonfor.evaluate.bean;


import com.soonfor.evaluate.tools.CommonUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * 作者：DC-DingYG on 2018-10-18 15:18
 * 邮箱：dingyg012655@126.com
 */
public class ReturnVisitBean {

    /**[{
     “frvisitprjid”,0,//回访题目id
     “frvisitprjcode”:”002”//回访题目代号
     “frvisitprjdesc”:”上门量尺”//回访题目描述
     “ftype”:”1”,//回访题目类型：1.是非型，2.单选型，3.多选型，4.简答型
     “ftypedesc”:”是非型”,
     “fpoint”:0,//分值
     “fdcshowseqno”:0,//排序值
     “fremark”,””,//备注
     “fanswerdesc”:”我是XXX,我很渣”,// 问答题回访内容
     “fynval”:”0”,//单选项值:0.否，1.是
     “factpoint”:0,//得分
     “item”:[//回访结果选项
     {
     “frvisitprjid”:0,//回访题目id
     “fselcode”:”001”,//选项代号
     “fseldesc”:”爬山”,//选项描述
     “fpoint”:0,//选项分值
     “fifchecked”:”0”//是否选中
     “fremark”:”备注”
     }
     ]
     }
     */
    private String frvisitprjid;//回访题目id
    private String frvisitprjcode;//回访题目代号
    private String frvisitprjdesc;//回访题目描述
    private String ftype;//回访题目类型：1.是非型，2.单选型，3.多选型，4.简答型
    private String ftypedesc;//回访题目类型描述
    private String fpoint;//分值
    private String fdcshowseqno;//排序值
    private String fremark;//备注
    private String fanswerdesc;// 问答题回访内容
    private String fynval;//单选项值:0.否，1.是
    private String factpoint;//得分
    private List<Answer> item;//回访结果选项

    public String getFrvisitprjid() {
        return CommonUtils.formatStr(frvisitprjid);
    }

    public String getFrvisitprjcode() {
        return CommonUtils.formatStr(frvisitprjcode);
    }

    public String getFrvisitprjdesc() {
        return CommonUtils.formatStr(frvisitprjdesc);
    }

    public int getFtype() {
        return Integer.parseInt(CommonUtils.formatNum(ftype));
    }

    public String getFtypedesc() {
        return CommonUtils.formatStr(ftypedesc);
    }

    public int getFpoint() {
        return  Integer.parseInt(CommonUtils.formatNum(fpoint));
    }

    public String getFdcshowseqno() {
        return CommonUtils.formatStr(fdcshowseqno);
    }

    public String getFremark() {
        return CommonUtils.formatStr(fremark);
    }

    public String getFanswerdesc() {
        return CommonUtils.formatStr(fanswerdesc);
    }

    public int getFynval() {
        return  Integer.parseInt(CommonUtils.formatNum(fynval));
    }

    public int getFactpoint() {
        return Integer.parseInt(CommonUtils.formatNum(factpoint));
    }

    public List<Answer> getItem() {
        return item==null?new ArrayList<Answer>():item;
    }

    public void setFrvisitprjid(String frvisitprjid) {
        this.frvisitprjid = frvisitprjid;
    }

    public void setFrvisitprjcode(String frvisitprjcode) {
        this.frvisitprjcode = frvisitprjcode;
    }

    public void setFrvisitprjdesc(String frvisitprjdesc) {
        this.frvisitprjdesc = frvisitprjdesc;
    }

    public void setFtype(String ftype) {
        this.ftype = ftype;
    }

    public void setFtypedesc(String ftypedesc) {
        this.ftypedesc = ftypedesc;
    }

    public void setFpoint(String fpoint) {
        this.fpoint = fpoint;
    }

    public void setFdcshowseqno(String fdcshowseqno) {
        this.fdcshowseqno = fdcshowseqno;
    }

    public void setFremark(String fremark) {
        this.fremark = fremark;
    }

    public void setFanswerdesc(String fanswerdesc) {
        this.fanswerdesc = fanswerdesc;
    }

    public void setFynval(String fynval) {
        this.fynval = fynval;
    }

    public void setFactpoint(int factpoint) {
        this.factpoint = factpoint+"";
    }

    public void setItem(List<Answer> item) {
        this.item = item;
    }

    /**
     * 答案选项对象
     */
    public static class Answer {
        private String frvisitprjid;//回访题目id
        private String frvisitprjitemid;//答案id
        private String fselcode;//选项代号
        private String fseldesc;//选项描述
        private int fpoint;//分值
        private int fifchecked;//是否选中
        private String fremark;//备注

        public Answer(String fseldesc, int fpoint, int fifchecked) {
            this.fseldesc = fseldesc;
            this.fpoint = fpoint;
            this.fifchecked = fifchecked;
        }

        public String getFrvisitprjid() {
            return CommonUtils.formatStr(frvisitprjid);
        }

        public String getFrvisitprjitemid() {
            return CommonUtils.formatStr(frvisitprjitemid);
        }

        public String getFselcode() {
            return CommonUtils.formatStr(fselcode);
        }

        public String getFseldesc() {
            return CommonUtils.formatStr(fseldesc);
        }

        public int getFpoint() {
            return fpoint;
        }

        public int getFifchecked() {
            return fifchecked;
        }

        public String getFremark() {
            return CommonUtils.formatStr(fremark);
        }

        public void setFifchecked(int fifchecked) {
            this.fifchecked = fifchecked;
        }
    }
}
